﻿@model HotelManageSystem.Models.FinanceModel
<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"> </script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"> </script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"> </script>
<link href= "@Url.Content("~/Content/TelerikGrid.css")"rel="stylesheet" type="text/css" />
<style>
    select
    {
        height: 24px;
        width: 90%;
    }
    input
    {
        height: 23px;
        width: 50%;
    }
    textarea
    {
        max-width: 90%;
        max-height: 70px;
        min-width: 90%;
        min-height: 70px;
        resize: none;
    }
</style>
<script type="text/javascript">
    $(document).ready(function () {
        $("#return").click(function () {
            $.get("/Finance/ManageFinance", null, function (data) {
                $("#content").html(data);
            });

            $.post("HumanResources/SetSeesion", { u: "Finance/ManageFinance" }, function () { });
        });
    });
</script>
<div class="t-widget t-grid" style="width: 100%; height: 100%">
    @using (Html.BeginForm("EditFinance", "Finance", FormMethod.Post))
    {
        @Html.ValidationSummary(true)
        <div class="t-edit-form-container" style="width: 100%;">
            <fieldset style="width: 100%; border: 0px;">
                <legend style="font-size: 20px;">修改财务记录：</legend>
                <table>
                    <tr>
                        <td>
                            <div class="editor-label">
                                @Html.Label("Type", "类型")
                            </div>
                            <div class="editor-field">
                                @Html.DropDownListFor(model => model.Type, new[]
                                    {
                                        new SelectListItem() {Value="1",Text ="收入"},
                                        new SelectListItem() {Value ="-1",Text="支出"}
                                    })
                            </div>
                        </td>
                        <td>
                            <div class="editor-label">
                                @Html.LabelFor(model => model.Income)
                            </div>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.Income)
                                @Html.ValidationMessageFor(model => model.Income)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="editor-label">
                                @Html.LabelFor(model => model.FinanceDate)
                            </div>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.FinanceDate)
                                @Html.ValidationMessageFor(model => model.FinanceDate)
                            </div>
                        </td>
                        <td>
                            <div class="editor-label">
                                @Html.LabelFor(model => model.Remark)
                            </div>
                            <div class="editor-field">
                                @Html.TextAreaFor(model => model.Remark)
                                @Html.ValidationMessageFor(model => model.Remark)
                            </div>
                        </td>
                    </tr>
                </table>
                <p>
                    <input type="submit" value="提交" style="height: 23px; width: 5%;" />
                    <input type="button" value="返回" id="return" style="height: 23px; width: 5%;" />
                </p>
            </fieldset>
        </div>
    }
</div>
